<?php
class AWConfig{
	function &getConfig($configid = 1) {
		static $config;
		if(!$config) {
			$db = &JFactory::getDBO();
			// get all the extensions published in the component
			$query = "SELECT * FROM #__aw_config"
			."\n WHERE id='{$configid}' AND published='1'";
			$db->setQuery($query);
			$config = $db->loadObject();
		}
		return $config;
	}
	function &getAWhois() {
		static $AWhois;
		if(!$AWhois) {
			require_once(JPATH_COMPONENT.DS.'classes'.DS.'ajaxwhois.class.php');
			$AWhois = new AWhois();
		}
		return $AWhois;
	}
}
?>
